<include file="../Public/header" />

        
        

    </head>
    <body>

        <div id="container">
            <form action="__URL__/doAddAd" method="post" class="form_validator">
                <php>if($ad["id"]){</php>
                <input type="hidden" name="id" value="{$ad.id}">
                <php>}</php>
            <table border="0" cellPadding=4 cellSpacing=0 class=form>
                <TBODY>
                <tr class="top">
                    <td colspan="2" class="tit">添加新广告</td>
                </tr>

                <tr>
                    <th class="th">广告标题</th>
                <td class="td" ><input class=t_input name=title value="{$ad.title}"></td></tr>
                <TBODY id=style_system>
                    <tr>
                        <th class="th">页面位置</th>
                        <td class="td" >
                            <select name="place" id="place">
                                <php>if(!in_array("header",$places)){</php> <option selected value=header>页面顶部(宽970px)</option>  <php>}</php>
                                <php>if(!in_array("footer",$places)){</php>  <option value=footer>页脚 (宽970px)</option>  <php>}</php>
                                 <php>if(!in_array("contenttop",$places)){</php> <option  value=contenttop>页面主区域上方 (宽800px)</option>  <php>}</php>
                                 <php>if(!in_array("contentbottom",$places)){</php> <option value=contentbottom>页面主区域下方 (宽800px)</option>  <php>}</php>
                                 <php>if(!in_array("leftmenu",$places)){</php> <option value=leftmenu>左侧菜单下方 (宽90px)</option>  <php>}</php>
                            </select>
                            <script>
                                $("#place option[value='{$ad.place}']").attr("selected",true);
                            </script>
                        </td>
                    </tr>
      
                    <tr>
                        <th class="th">有效性</th>
                        <td class="td">
                            <input name=use type=radio class="radio" value=1 <php>if( !$ad || $ad["use"] == 1){</php> checked="true" <php>}</php>>有效
                            <input name=use  type=radio class="radio" value=0 <php>if($ad && $ad["use"] == 0){</php> checked="true" <php>}</php>>  无效
                        </td>
                    </tr>
            
        

                <TBODY id=style_html>
                    <tr>
                        <th class="th" valign="top">广告代码(必填)</th>
                        <td class="td" >
                            {:W("Edit",array('name'=>'ad',width=>"95%",'cols'=>40,'rows'=>15,'smileList'=>$smileList,'smilePath'=>$smilePath,'content'=>stripslashes($ad['ad'])))}
                        </td>
                    </tr>
                </TBODY>



                <tr>
                    <th class="th">&nbsp;</th>
                    <td class="td" ><input type="submit" class="button" id="button" value="提交" /></td>
                </tr>

            </form>
            </table>
        </div>
    </body>
</html>
